﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace yaai
{
    public class simpleGrunka
    {
        private String word;

        private WordList list;

        public simpleGrunka(String w)
        {
            word = w;
            list = null;
        }

        public simpleGrunka(WordList w)
        {
            word = null;
            list = w;
        }

        public String getDescriptor()
        {
            if (word != null)
                return word;
            if (list != null)
                return "<" + list.getName() + ">";
            else
                return "ERROR";
        }

        public String getContent()
        {
            if (word != null)
                return word;
            else
                return list.getRandomWord();
        }
    }
}
